var checkoutUrl = 'http://115.28.0.60/mdm/api/v1/devices/'; // HTTP DELETE

var request = require('request');

var options = {
    url: checkoutUrl + 'ffffffff-a682-9529-7e85-d336490bafd6',
    method: 'DELETE',
    headers: {
        'User-Agent': 'request',
        'Content-type': 'application/json; charset=utf-8'
    }
};

function callback(error, response, body) {
    if (!error && response.statusCode == 200) {
        var info = JSON.parse(body);
        // { result: 0, desc: 'success', detail: '{"code" : 2000,"desc" : "device checkout success"}' }
        console.log(info);
    }
}
// 开始发送请求
request(options, callback);

